package com.server.llh.llhserverwork.adapter;


import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.llh.llhsuppliers.R;


public class MyMenuAdapter extends BaseAdapter {
	String[] data = { "待结账户", "餐饮订单", "我的钱包",
			"修改密码","设备检索","退出"};
	int[] id = { R.drawable.android_my_jd_account_center,
			R.drawable.android_personel_quickly_order,
			R.drawable.android_my_jd_wallet, R.drawable.android_my_jd_appoint,
			R.drawable.android_my_jd_discuss,
			R.drawable.android_my_jd_service_manager,
			R.drawable.android_my_jd_service_manager,
			R.drawable.android_my_jd_messages,
			R.drawable.android_my_jd_account_safe,
			R.drawable.android_my_jd_easy_mananger,
			R.drawable.android_my_jd_phone_appoint,R.drawable.android_my_jd_return_repair,
 };
	private LayoutInflater lif = null;

	public MyMenuAdapter(Context context) {
		lif = LayoutInflater.from(context);
	}

	@Override
	public int getCount() {
		return data.length;
	}

	@Override
	public Object getItem(int arg0) {
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		return arg0;
	}

	@SuppressLint({ "ViewHolder", "InflateParams" })
	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		arg1 = lif.inflate(R.layout.server_menu_item, null);
		ImageView iv = (ImageView) arg1.findViewById(R.id.imag_server);
		iv.setImageResource(id[arg0]);
		TextView tv = (TextView) arg1.findViewById(R.id.list_item_btn1);
		tv.setText(data[arg0]);
		return arg1;
	}

}
